package com.glsc.ngateway.common.base.domainmapper.cmdb;
import com.glsc.ngateway.common.base.domain.mysql.cmdb.CmdbCpuDetail;
import com.glsc.ngateway.common.base.domain.mysql.gateway.platform.flow.cmdb.FlowFormCPUInDetail;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @Author: zhengyr
 * @Desc: 配件入库流程表到业务表转换
 */
@Mapper(componentModel = "spring")
public interface FlowFormCpuInMapper {

    FlowFormCpuInMapper INSTANCE = Mappers.getMapper(FlowFormCpuInMapper.class);

    @Mapping(target = "cpuDetailId", ignore = true)
    @Mapping(target = "cpuDetailCode", ignore = true)
    @Mapping(target = "deviceCode", ignore = true)
    @Mapping(target = "isDelete", ignore = true)
    @Mapping(target = "locationId", ignore = true)
    @Mapping(target = "cmdbCpuStandard", ignore = true)
    CmdbCpuDetail dto2domain(FlowFormCPUInDetail dto);
    List<CmdbCpuDetail> dto2domain(List<FlowFormCPUInDetail> dto);
}
